<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/template2.xhtml">

	<ui:define name="content1">
		<h:form>
			<h:selectOneRadio value="#{adminPageBean.menu}"
				valueChangeListener="#{adminPageBean.listener}" onchange="submit()">
				<f:selectItem itemValue="User" itemLabel="User" />
				<f:selectItem itemValue="Manager" itemLabel="Manager" />
				<f:selectItem itemValue="Admin" itemLabel="Admin" />
			</h:selectOneRadio>
			<f:ajax event="">

				<div class="invertedshiftdown" id="tabContentAdmin">
					<ul id="admin">
						<li
							class="#{(adminPageBean.page eq 'users' or adminPageBean.page eq 'editUser' or adminPageBean.page eq 'createUser')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Admin'}"
								value="#{msg.AD_mainAdmin_users}">
								<f:actionListener binding="#{ub.setMessage('')}" />
								<f:actionListener binding="#{adminPageBean.setPage('users')}" />
							</h:commandLink></li>
						<li
							class="#{(adminPageBean.page eq 'domainCrud')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Admin'}"
								value="#{msg.AD_mainAdmin_domain}">
								<f:actionListener binding="#{domainBean.setMessage('')}" />
								<f:actionListener
									binding="#{adminPageBean.setPage('domainCrud')}" />
							</h:commandLink></li>
						<li
							class="#{(adminPageBean.page eq 'decideReplacer')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Admin'}"
								value="#{msg.AD_mainAdmin_replacers}">
								<f:actionListener
									binding="#{adminPageBean.setPage('decideReplacer')}" />
							</h:commandLink></li>
						<li
							class="#{(adminPageBean.page eq 'editUnitMeasures')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Admin'}"
								value="#{msg.AD_mainAdmin_measureunits}">
								<f:actionListener
									binding="#{editMeasureunitsBean.setMessage('')}" />
								<f:actionListener
									binding="#{adminPageBean.setPage('editUnitMeasures')}" />
							</h:commandLink></li>
						<li
							class="#{(adminPageBean.page eq 'editPrinterIp')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Admin'}" value="#{msg.AD_mainAdmin_printers}">
								<f:actionListener binding="#{printerIpBean.setMessage('')}" />
								<f:actionListener
									binding="#{adminPageBean.setPage('editPrinterIp')}" />
							</h:commandLink></li>
						<li
							class="#{(managerPageBean.page eq 'manageRequest')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Manager'}"
								value="#{msg.OM_manager_manageRequests}" immediate="true"
								actionListener="#{managerPageBean.setPage('manageRequest')}">
							</h:commandLink></li>
						<li
							class="#{(managerPageBean.page eq 'printerInformation')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Manager'}"
								value="#{msg.OM_manager_printerInfo}" immediate="true">
								<f:actionListener binding="#{printersBean.setMessage('')}" />
								<f:actionListener
									binding="#{managerPageBean.setPage('printerInformation')}"></f:actionListener>
							</h:commandLink></li>
						<li
							class="#{(managerPageBean.page eq 'manageResources')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Manager'}"
								value="#{msg.OM_manager_manageResources}" immediate="true"
								actionListener="#{managerPageBean.setPage('manageResources')}">
							</h:commandLink></li>

						<li
							class="#{(managerPageBean.page eq 'manageUsers')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'Manager'}"
								value="#{msg.OM_manager_manageUsers}"
								actionListener="#{managerPageBean.setPage('manageUsers')}"
								immediate="true">
							</h:commandLink></li>
						<li
							class="#{(userPageBean.page eq 'requestResources')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'User'}"
								value="#{msg.BU_mainUser_menu_reqResources}"
								actionListener="#{userPageBean.setPage('requestResources')}">
							</h:commandLink></li>
						<li
							class="#{(userPageBean.page eq 'createNotification')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'User'}"
								value="#{msg.BU_mainUser_menu_createNotification}">
								<f:actionListener binding="#{notificationBean.setFeedback('')}" />
								<f:actionListener
									binding="#{userPageBean.setPage('createNotification')}" />

							</h:commandLink></li>
						<li
							class="#{(userPageBean.page eq 'editProfile')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'User'}"
								value="#{msg.BU_mainUser_menu_editProfile}"
								actionListener="#{userPageBean.setPage('editProfile')}" /></li>
						<li
							class="#{(userPageBean.page eq 'editStatus')? 'current' : 'nothing'}"><h:commandLink
								rendered="#{adminPageBean.menu eq 'User'}"
								value="#{msg.BU_mainUser_menu_editStatus}"
								actionListener="#{userPageBean.setPage('editStatus')}" /></li>
					</ul>
				</div>
			</f:ajax>
		</h:form>

		<h:panelGroup id="content1" layout="block">

			<h:panelGroup
				rendered="#{adminPageBean.page == 'users' and adminPageBean.menu == 'Admin'}">
				<ui:include src="/admin/users.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{adminPageBean.page == 'editUser' and adminPageBean.menu == 'Admin'}">
				<ui:include src="/admin/editUser.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{adminPageBean.page == 'createUser' and adminPageBean.menu == 'Admin'}">
				<ui:include src="/admin/createUser.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{adminPageBean.page == 'domainCrud' and adminPageBean.menu == 'Admin'}">
				<ui:include src="/admin/domainCrud.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{adminPageBean.page == 'decideReplacer' and adminPageBean.menu == 'Admin'}">
				<ui:include src="/admin/decideReplacer.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{adminPageBean.page == 'editUnitMeasures' and adminPageBean.menu == 'Admin'}">
				<ui:include src="/admin/editUnitMeasures.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{adminPageBean.page == 'editPrinterIp' and adminPageBean.menu == 'Admin'}">
				<ui:include src="/admin/editPrinterIp.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'manageRequest' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/request.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'createResponse' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/responseRequest.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'printerInformation' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/printerReport.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'printerResponse' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/printerResponse.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'manageResources' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/resourceCRUD.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'manageUsers' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/crudusers.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'addUser' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/newuser.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{managerPageBean.page == 'editUser' and adminPageBean.menu == 'Manager'}">
				<ui:include src="/manager/editbasicuser.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{userPageBean.page == 'createNotification' and adminPageBean.menu == 'User'}">
				<ui:include src="/user/createNotification.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{userPageBean.page == 'editProfile' and adminPageBean.menu == 'User'}">
				<ui:include src="/user/editProfile.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{userPageBean.page == 'viewNotificationHistory' and adminPageBean.menu == 'User'}">
				<ui:include src="/user/viewNotificationHistory.xhtml" />
			</h:panelGroup>

			<h:panelGroup
				rendered="#{userPageBean.page == 'requestResources' and adminPageBean.menu == 'User'}">
				<ui:include src="/user/requestResources.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{userPageBean.page == 'requestHistory' and adminPageBean.menu == 'User'}">
				<ui:include src="/user/requestHistory.xhtml" />
			</h:panelGroup>
			<h:panelGroup
				rendered="#{userPageBean.page == 'editStatus' and adminPageBean.menu == 'User'}">
				<ui:include src="/user/editStatus.xhtml" />
			</h:panelGroup>

		</h:panelGroup>
	</ui:define>

</ui:composition>
</html>